<#assign module="news"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
<style>
	.input-query-multiple{
		min-width: 300px;
	    padding: 0px 0px;
	    height: auto;
	    margin-top: 20px;
	}
</style>
</@override>
<@override name="body">
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
               	 查看广告
            </div>
            <div class="panel-body">
                <form id="submit_form" action="#" class="form-horizontal" method="post">
				  <div class="form-group">
						<label class="col-sm-3 control-label"><em></em>是否置顶:</label>
	                    <div class="col-sm-3">
	                    	<label>
							  <input type="radio" name="status" value="2" <#if noticeNews.status==2> checked </#if> />是
							</label>
							&nbsp;&nbsp;&nbsp;
							<label>
							  <input type="radio" name="status" value="1" <#if noticeNews.status==1> checked </#if> />否
							</label>
						</div>
					</div>
					
					<@shiro.isMainCompany>
						<#if noticeNews.companyId??> 
							 <div class="form-group">
		                        <label class="col-sm-3 control-label"><em></em>公司名称:</label>
		                        <div class="col-sm-3">
		                            <input class="form-control" type="text" id="companyId" name="companyId" value="${companyName}" readOnly/>
		                        </div>
		                    </div>
						</#if> 
					</@shiro.isMainCompany>
					
					<div class="form-group">
						<label class="col-sm-3 control-label"><em></em>服务类型:</label>
						<div class="col-sm-3">
							<select class="form-control" id="serviceType" name="serviceType" readOnly>
								<option value="">--无--</option>
								<@pao>
								<option value="pao" <#if noticeNews.serviceType?? && noticeNews.serviceType == "pao">selected="selected"</#if>>跑腿</option>
								</@pao>
								<@daijia>
								<option value="daijia" <#if noticeNews.serviceType?? && noticeNews.serviceType == "daijia">selected="selected"</#if>>代驾</option>
								</@daijia>
								<@zhuan>
								<option value="zhuan" <#if noticeNews.serviceType?? && noticeNews.serviceType == "zhuan">selected="selected"</#if>>专车</option>
								</@zhuan>
								<@freight>
								<option value="freight" <#if noticeNews.serviceType?? && noticeNews.serviceType == "freight">selected="selected"</#if>>货运</option>
								</@freight>
								<@zu>
								<option value="zu" <#if noticeNews.serviceType?? && noticeNews.serviceType == "zu">selected="selected"</#if>>租车</option>
								</@zu>
								<@gasstation>
								<option value="gasstation" <#if noticeNews.serviceType?? && noticeNews.serviceType == "gasstation">selected="selected"</#if>>加油站</option>
								</@gasstation>
								<@zhuanxian>
								<option value="zhuanxian" <#if noticeNews.serviceType?? && noticeNews.serviceType == "zhuanxian">selected="selected"</#if>>快车</option>
								</@zhuanxian>
							</select>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-3 control-label"><em></em>终端类型:</label>
						<div class="col-sm-3">
							<select class="form-control" id="contType" name="contType" readOnly>
								<option value="">--无--</option>
								<@weixin>
								<option value="weixin" <#if noticeNews.contType?? && noticeNews.contType == "weixin">selected="selected"</#if>>微信公众号</option>
								</@weixin>
								<option value="app" <#if noticeNews.contType?? && noticeNews.contType == "app">selected="selected"</#if>>APP</option>
							</select>
						</div>
					</div>
					
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><em></em>广告标题:</label>
                        <div class="col-sm-3">
                            <input class="form-control" type="text" id="title" name="title" value="${noticeNews.title}" readOnly/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><em></em>广告作者:</label>
                        <div class="col-sm-3">
                            <input class="form-control" type="text" id="author" name="author" value="${noticeNews.author}" readOnly/>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><em></em>发布时间:</label>
                         <div class="col-sm-3">
                            <input class="form-control" type="text" id="created" name="created" value="${created}" readOnly/>
                        </div>
                    </div>
                    
                    <#if noticeNews.link?? && noticeNews.link !="">
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><em></em>广告链接:</label>
                         <div class="col-sm-3">
                            <input class="form-control" type="text" id="link" name="link" value="${noticeNews.link!}" readOnly/>
                        </div>
                    </div>
                    </#if>
					        
                    <div class="form-group">
                    	<label class="col-sm-3 control-label"><em></em>广告导图:</label>
                    	<div class="col-sm-6">
                            <img id="picture_img" width="400px;" height="200px;" src="${noticeNews.image}" readOnly/>
	                    </div>
                    </div>
                    
					<#if noticeNews.content?? && noticeNews.content !="">
					<div class="form-group">
	                    <label class="col-sm-3 control-label"><em></em>广告内容:</label>
	                    <div class="col-sm-6">
							<textarea class="form-control" id="content" name="content"  rows="8" readOnly>${noticeNews.content}</textarea>
		                    <span class="word_count1"></span>
		                    <span class="word_count2"></span>
		                    <span class="word_surplus"></span>
	                    </div>
	                </div>
	                </#if>

                    <div class="form-group" style="margin-left:10px;">
                        <label class="col-sm-3 control-label"></label>
                        <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/news/list';" value="返回">
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
</@override>
<@override name="footer">
<script src="${ctx}/assets/js/bootstrap-multiselect.js"></script>
<script src="${ctx}/assets/js/ajaxfileupload.js"></script>
<script src="${ctx}/assets/kindeditor/kindeditor-all-min.js"></script>
<script src="${ctx}/assets/kindeditor/lang/zh_CN.js"></script>
<script src="${ctx}/assets/js/datepicker.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	KindEditor.ready(function(K) {
		var editer=K.create('#content',{
			filterMode : false,
			uploadJson : ctx+'/common/kindeditor/fileupload',
			allowUpload : true,
			fileManagerJson : ctx+'/common/kindeditor/filemanager',
			allowFileManager : true,
			height:400,
			width:'100%',
			resizeType:0,
			afterCreate : function() {
				var self = this;
				K.ctrl(document, 13, function() {
					self.sync();
				});
				K.ctrl(self.edit.doc, 13, function() {
					self.sync();
				});
			},
			afterBlur:function(){ 
				this.sync();
			}
		});
			editer.readonly(true);
	});
});
</script>
</@override>
<@extends name="../layout.ftl"/>
